package org.lemon.transport.context.data.queue.message;

import java.util.UUID;

public class DefaultQueueMessage implements QueueMessage {

    private final UUID key;
    protected final byte[] value;
    private final QueueMessageHeaders headers;

    public DefaultQueueMessage(QueueMessage message) {
        this.key = message.getKey();
        this.value = message.getData();
        this.headers = message.getHeaders();
    }

    @Override
    public UUID getKey() {
        return this.key;
    }

    @Override
    public QueueMessageHeaders getHeaders() {
        return this.headers;
    }

    @Override
    public byte[] getData() {
        return this.value;
    }
}
